package com.kangyi.admin.mapper;

import com.kangyi.admin.annotation.AutoFill;
import com.kangyi.entity.PublicActivityImg;
import com.kangyi.enumeration.OperationType;
import com.kangyi.vo.PublicActivityImgVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Blank
 * @version 1.0
 */
@Mapper
public interface PublicActivityImageMapper {

    @AutoFill(value = OperationType.INSERT)
    void addBatch(List<PublicActivityImg> publicActivityImgList);

    @Delete("delete from public_activity_img where public_activity_id = #{publicActivityId};")
    void deleteByPublicActivityId(Integer publicActivityId);


    @Select("select * from public_activity_img where public_activity_id = #{publicActivityId};")
    List<PublicActivityImgVO> selectByPublicActivityId(Integer id);
}
